package com.jinglin.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 用户信息表
 * </p>
 *
 * @author ${author}
 * @since 2025-03-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="UserInfo对象", description="用户信息表")
public class UserInfo extends Model<UserInfo> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户id")
      @TableId(value = "user_id", type = IdType.ASSIGN_ID)
    private String userId;

    @ApiModelProperty(value = "昵称")
    private String nickName;

    private String avatar;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "密码")
    private String password;

    @ApiModelProperty(value = "0女 1男 2未知")
    private Integer sex;

    @ApiModelProperty(value = "出生日期")
    private String birthday;

    @ApiModelProperty(value = "学校")
    private String school;

    @ApiModelProperty(value = "个人简介")
    private String personIntroduction;

    @ApiModelProperty(value = "加入时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date joinTime;

    @ApiModelProperty(value = "最后登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date lastLoginTime;

    @ApiModelProperty(value = "最后登录IP")
    private String lastLoginIp;

    @ApiModelProperty(value = "0禁用 1正常")
    private Integer status;

    @ApiModelProperty(value = "空间公告")
    private String noticeInfo;

    @ApiModelProperty(value = "硬币总数量")
    private Integer totalCoinCount;

    @ApiModelProperty(value = "当前硬币数")
    private Integer currentCoinCount;

    @ApiModelProperty(value = "当前空间的主题")
    private Integer theme;
    @TableField(exist = false)
    private Integer fansCount;
    @TableField(exist = false)
    private Integer focusCount;

    @ApiModelProperty(value = "1删除 0正常使用")
    @TableLogic(value = "0",delval = "1")
    private Integer deleted;


    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

}
